﻿using System;
using System.ComponentModel.DataAnnotations;

namespace VisionCloud.Domain.DtoModel.Applet.RequestDto
{
    public class QuestionDto
    {
        /// <summary>
        /// 诊断Id
        /// </summary>
        public Guid? DiagnosticId { get; set; }

        /// <summary>
        /// 提问内容
        /// </summary>
        [Required]
        public string Content { get; set; }

        /// <summary>
        /// 标志当前登录用户socketID，游客模式发送聊天消息需要带上这个id
        /// </summary>
        public Guid? SocketId { get; set; }
    }

    public class RequetQuestionDto
    {
        public RequetQuestionDto(QuestionDto questionDto)
        {
            question = questionDto.Content;

            filename = questionDto.DiagnosticId ?? Guid.Empty;

            userid = questionDto.SocketId.Value;
        }

        /// <summary>
        /// 用户Id，前端不用传
        /// </summary>
        public Guid userid { get; set; }

        /// <summary>
        /// 诊断Id
        /// </summary>
        public Guid filename { get; set; }

        /// <summary>
        /// 提问内容
        /// </summary>
        public string question { get; set; }

        public Guid msgid { get; set; } = Guid.NewGuid();

        public string save_dir { get; set; } = "./MdResult";
    }
}